home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 5873 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.7 KB  |  37 lines

  1. Path: nntp-trd.UNINETT.no!usenet
  2. From: Hσvard Pedersen <havardp@mail.stud.ingok.hitos.no>
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: 24bit -> HAM6/HAM8
  5. Date: Thu, 21 Mar 1996 12:30:42 -0800
  6. Organization: HIT
  7. Message-ID: <3151BC72.6988@mail.stud.ingok.hitos.no>
  8. References: <4ik6l3$18v@irz409.inf.tu-dresden.de>
  9. NNTP-Posting-Host: dig108.stud.ingok.hitos.no
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=iso-8859-1
  12. Content-Transfer-Encoding: 8bit
  13. X-Mailer: Mozilla 2.0 (Win16; I)
  14.  
  15. Sven Steiniger wrote:
  16. > I have just a small question. How could I dither(?) a 24bit-buffer to HAM6
  17. > or HAM8?
  18.  
  19. As I see it, there are two easy ways to accomplish this. First you need a 
  20. palette. This could be done by:
  21.  
  22.     a) computing a palette using a histogram from the picture.
  23.     b) using a fixed palette of 64 colors. 2-red, 2-green, 2-blue.
  24.  
  25. And then walk through the picture pixel for pixel determining which color 
  26. gives closest match, hold-and-modify or fetching a color from the palette. I 
  27. haven't tried this in theory, so I don't know how the speed or result will be 
  28. for this method, but I believe this is what most applications does. For even 
  29. better results, a normal floyd-steinberg-dithering could be applied.
  30.  
  31. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-"Sometimes I wish there was a knob for intelligence on my TV set. There's
  32. one called brightness, but it doesn't seem to work."  - Brian Eno
  33. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-Hσvard Pedersen            E-Mail: havardp@mail.stud.ingok.hitos.no
  34. aka Howard/Mental Diseases    IRC-Channels: #amiga, #amigascne, #norway
  35.                 IRC-Nick: Howard_MD
  36. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
  37.